{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "2dfc4698",
   "metadata": {},
   "source": [
    "# URL\n",
    "\n",
    "This example covers how to load `HTML` documents from a list of `URLs` into the `Document` format that we can use downstream.\n",
    "\n",
    "## Unstructured URL Loader\n",
    "\n",
    "For the examples below, please install the `unstructured` library and see [this guide](/docs/integrations/providers/unstructured/) for more instructions on setting up Unstructured locally, including setting up required system dependencies:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "cb26084d-a2b0-4685-9ec4-346139ffe0fb",
   "metadata": {},
   "outputs": [],
   "source": [
    "%pip install --upgrade --quiet unstructured"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "16c3699e",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_community.document_loaders import UnstructuredURLLoader\n",
    "\n",
    "urls = [\n",
    "    \"https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-8-2023\",\n",
    "    \"https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023\",\n",
    "]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "33089aba-ff74-4d00-8f40-9449c29587cc",
   "metadata": {},
   "source": [
    "Pass in ssl_verify=False with headers=headers to get past ssl_verification errors."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "00f46fda",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Document(page_content='Skip to main content\\n\\nSearch form\\n\\nHome\\n\\nWho We Are\\n\\nResearch\\n\\nPublications\\n\\nGet Involved\\n\\nPlanned Giving\\n\\nDonate\\n\\nRussian Offensive Campaign Assessment, February 8, 2023\\n\\nFeb 8, 2023 - ISW Press\\n\\nDownload the PDF\\n\\nKarolina Hird, Riley Bailey, George Barros, Layne Philipson, Nicole Wolkov, and Mason Clark\\n\\nFebruary 8, 8:30pm ET\\n\\nClick\\xa0here\\xa0to see ISW’s interactive map of the Russian invasion of Ukraine. This map is updated daily alongside the static maps present in this report.\\n\\nRussian forces have regained the initiative in Ukraine and have begun their next major offensive in Luhansk Oblast.\\xa0The pace of Russian operations along the Svatove-Kreminna line in western Luhansk Oblast has increased markedly over the past week, and Russian sources are widely reporting that conventional Russian troops are attacking Ukrainian defensive lines and making marginal advances along the Kharkiv-Luhansk Oblast border, particularly northwest of Svatove near Kupyansk and west of Kreminna.[1]\\xa0Geolocated combat footage has confirmed Russian gains in the Dvorichne area northwest of Svatove.[2]\\xa0Russian military command additionally appears to have fully committed elements of several conventional divisions to decisive offensive operations along the Svatove-Kreminna line, as ISW previously reported.[3]\\xa0Elements of several regiments of the 144th\\xa0and 3rd\\xa0Motor Rifle Division (20th\\xa0Combined Arms Army, Western Military District) and a regiment of the 90th\\xa0Tank Division (Central Military District), supported by elements of the 76th\\xa0Airborne Division and unspecified Southern Military District elements, are conducting offensive operations along the entire Svatove-Kreminna line and are reportedly advancing against Ukrainian defenses.[4]\\n\\nThe commitment of significant elements of at least three major Russian divisions to offensive operations in this sector indicates the Russian offensive has begun, even if Ukrainian forces are so far preventing Russian forces from securing significant gains.\\xa0The Russian offensive likely has not yet reached its full tempo; Russian command has not yet committed elements of the 2nd\\xa0Motorized Rifle Division (1st\\xa0Guards Tank Army, Western Military District), which deployed to Luhansk Oblast in January after deploying to Belarus.[5]\\xa0Russian forces are gradually beginning an offensive, but its success is not inherent or predetermined. While Russian forces in Luhansk Oblast now have the initiative (in that Russian forces are setting the terms of battle, ending the period of Ukrainian initiative from August 2022), the full commitment of these forces could lead to their eventual culmination along the Svatove-Kreminna line without achieving their objectives of capturing all of Luhansk and Donetsk oblasts. That culmination would likely provide a window of opportunity for Ukrainian forces to exploit with their own counteroffensive.[6]\\n\\nDonetsk People’s Republic (DNR) People’s Militia command reportedly assumed control over a Russian artillery battalion, likely in support of an effort to strengthen degraded DNR forces ahead of an imminent Russian offensive.\\xa0A Russian source published a video appeal from mobilized personnel of the 640th\\xa0howitzer battalion from Saratov Oblast on February 8 in which they stated that Russian military officials sent them to join DNR units and that DNR commanders are now trying to transfer them to infantry assault units.[7]\\xa0ISW has not previously observed Russian personnel subordinated to a DNR formation and this claim, if true, would suggest that Russian forces may be reinforcing degraded DNR formations with mobilized personnel from Russia itself because DNR formations are unable to replenish losses themselves. The reported subordination of Russian military personnel to DNR formations may portend a Russian effort to prepare DNR formations for an expanded role in their zone of responsibility along the western outskirts of Donetsk City, and the transfer of remaining conventional Russian forces from this area to the Bakhmut area and Luhansk Oblast, where Russian forces are conducting an increased pace of offensive operations.\\n\\nThe reported subordination of Russian mobilized personnel to DNR formations could also suggest that Russian military command may be continuing efforts to integrate ad hoc DNR and Luhansk People‘s Republic (LNR) formations into the Russian Armed Forces, but will likely face significant difficulties.\\xa0The Russian Southern Military District formally controls the armed forces of the DNR and LNR through the 1st\\xa0and 2nd\\xa0Army Corps, respectively. However, many DNR and LNR formations remain ad hoc units and are not fully integrated into Russian MoD structures. ISW previously assessed that the Russian Ministry of Defense (MoD) appears to be rushing to integrate irregular conventional forces into a more traditional structure and may be creating new formations from DNR/LNR units in support of Russian Defense Minister Sergei Shoigu’s proposals to create new maneuver divisions.[8]\\xa0Russian forces would likely need to temporarily remove these irregular forces from frontline positions to integrate them into new Russian formations, a prospect that would not be operationally sound ahead of increased Russan offensive operations in Ukraine. Russian officials therefore may be attempting to gradually integrate these irregular formations through subordinating mobilized personnel under them without disrupting the command structures and existing personnel operating at front line positions. The mobilized personnel of the 640th\\xa0howitzer battalion claimed that DNR command is retraining assault units for artillery purposes yet still committing their artillery battalion to infantry roles, indicating a breakdown in command and the proper utilization of personnel among DNR formations.[9]\\xa0The Russian MoD will likely struggle to correct the poor effectiveness of DNR/LNR forces through the rapid integration of Russian personnel.\\n\\nRussian officials continue to propose measures to prepare Russia’s military industry for a protracted war in Ukraine while also likely setting further conditions for sanctions evasion.\\xa0Russian Prime Minister Mikhail Mishustin stated on February 8 that the Russian government will subsidize investment projects for the modernization of enterprises operating in the interests of the Russian military and will allocate significant funds for manufacturing new military equipment.[10]\\xa0Mishustin also stated that the Russian government would extend benefits to Russian entrepreneurs who support the Russian military, including extended payment periods on rented federal property.[11]\\xa0The Kremlin likely intends these measures to augment its overarching effort to gradually prepare Russia’s military industry for a protracted war in Ukraine while avoiding a wider economic mobilization that would create further domestic economic disruptions and corresponding discontent.[12]\\n\\nRussian officials also likely proposed these measures in coordination with a recent decree excluding Russian officials from requirements to list income declarations and proposals to repeal federal procurement procedures. The Kremlin may be creating a system of subsidies and benefits designed to have little oversight or accounting. This lack of oversight and accounting would likely allow Russian firms to better evade international sanctions regimes targeting Russia’s military industry.[13]\\xa0The United Kingdom announced a new list of sanctioned entities on February 8 focused on Russia’s military industry.[14]\\xa0ISW previously reported that 82% of Iranian-made drones downed in Ukraine had chips, semiconductors, and other components from the United States, suggesting that Russia and Iran are likely exploiting loopholes to transfer Western-produced arms components to Russia via proxy actors.[15]\\xa0The Kremlin’s effort to prepare the Russian military industry for a protracted war in Ukraine in part relies on the ability of Russian military industry to have consistent access to multiple secure supply chains of key foreign components that it otherwise cannot produce.\\n\\nKey Takeaways\\n\\nRussian forces have regained the initiative in Ukraine and have begun their next major offensive in Luhansk Oblast.\\n\\nThe commitment of significant elements of at least three major Russian divisions to offensive operations in this sector indicates the Russian offensive has begun, even if Ukrainian forces are so far preventing Russian forces from securing significant gains.\\n\\nDonetsk People’s Republic (DNR) People’s Militia command reportedly assumed control over a Russian artillery battalion, likely in support of an effort to strengthen degraded DNR forces ahead of an imminent Russian offensive.\\n\\nThe reported subordination of Russian mobilized personnel to DNR formations could also suggest that Russian military command may be continuing efforts to integrate ad hoc DNR and Luhansk People‘s Republic (LNR) formations into the Russian Armed Forces, but will likely face significant difficulties.\\n\\nRussian officials continue to propose measures to prepare Russia’s military industry for a protracted war in Ukraine while also likely setting further conditions for sanctions evasion.\\n\\nRussian forces conducted ground attacks around Bakhmut and continued making tactical advances.\\n\\nRussian forces continued offensive actions northwest of Svatove and intensified offensive operations near Kreminna.\\n\\nRussian forces conducted limited ground attacks in the Avdiivka-Donetsk City area and western Donetsk Oblast.\\n\\nRussian and Ukrainian forces reportedly continue small-scale skirmishes and reconnaissance activity in the Dnipro River delta and on the Kinburn Spit.\\n\\nThe Wagner Group is reportedly resorting to more coercive tactics in its prison recruitment campaign, possibly in response to the campaign’s declining effectiveness.\\n\\nWe do not report in detail on Russian war crimes because those activities are well-covered in Western media and do not directly affect the military operations we are assessing and forecasting. We will continue to evaluate and report on the effects of these criminal activities on the Ukrainian military and population and specifically on combat in Ukrainian urban areas. We utterly condemn these Russian violations of the laws of armed conflict, Geneva Conventions, and humanity even though we do not describe them in these reports.\\n\\nUkrainian Counteroffensives—Eastern Ukraine\\n\\nRussian Main Effort—Eastern Ukraine (comprised of two subordinate main efforts);\\n\\nRussia Subordinate Main Effort #1—Capture the remainder of Luhansk Oblast and push westward into eastern Kharkiv Oblast and encircle northern Donetsk Oblast\\n\\nRussian Subordinate Main Effort #2—Capture the entirety of Donetsk Oblast\\n\\nRussian Supporting Effort—Southern Axis\\n\\nRussian Mobilization and Force Generation Efforts\\n\\nActivities in Russian-occupied Areas\\n\\nRussian Main Effort—Eastern Ukraine\\n\\nRussian Subordinate Main Effort #1- Luhansk Oblast (Russian objective: Capture the remainder of Luhansk Oblast and continue offensive operations into eastern Kharkiv Oblast and\\xa0\\xa0northern Donetsk Oblast)\\n\\nISW continues to assess the current Russian most likely course of action (MLCOA) is an imminent offensive effort in Luhansk Oblast and is therefore adjusting the structure of the daily campaign assessments. We will no longer include the Eastern Kharkiv and Western Luhansk Oblast area as part of Ukrainian counteroffensives and will assess this area as a subordinate part of the Russian main effort in Eastern Ukraine. The assessment of Luhansk Oblast as part of the Russian main effort does not preclude the possibility of continued Ukrainian counteroffensive actions here or anywhere else in theater in the future. ISW will report out on Ukrainian counteroffensive efforts as they occur.\\n\\nRussian forces continued offensive actions northwest of Svatove on February 8. Kharkiv Oblast Head Oleh Synehubov reported on February 8 that Russian forces are increasing their presence northwest of Svatove in the Kupyansk and Dvorichna areas.[16]\\xa0A former Luhansk People‘s Republic (LNR) deputy claimed that fierce fighting is ongoing 7km from the Kupyansk area, likely referring to areas near Synkivka, which Russian sources claimed Russian forces captured on February 6.[17]\\xa0The Ukrainian General Staff reported that Russian forces conducted a limited ground attack near Novoselivske, about 15km northwest of Svatove.[18]\\xa0\\xa0Former Russian militant commander and nationalist milblogger Igor Girkin denied that Russian forces have made any significant territorial gains in Kharkiv Oblast, particularly in the Kupyansk direction, as of February 8.[19]\\n\\nRussian forces also reportedly intensified offensive operations in the Kreminna area. Luhansk Oblast Head Serhiy Haidai stated on February 8 that there has been a ”maximum escalation” in the Kreminna direction and that Russian forces are attempting to break through Ukrainian defenses in this area.[20]\\xa0The Ukrainian General Staff reported that Russian forces attacked near Chervonopopivka (5km north of Kreminna).[21]\\xa0Several Russian milbloggers circulated unconfirmed footage of unspecified Central and Western Military District elements which crossed the Zherebets River running north to south in western Luhansk Oblast, roughly parallel to the Svatove-Kreminna line) and captured Ukrainian positions in an unspecified location around February 6.[22]\\xa0Russian sources also reported that elements of the 3rd\\xa0Motor Rifle Division (20th\\xa0Combined Arms Army, Western Military District) are approaching the Zherebets River and are threatening Ukrainian positions in the area.[23]\\xa0A prominent Russian milblogger posted footage of the 59th\\xa0Tank Regiment of the 144th\\xa0Motor Rifle Division (20th\\xa0Combined Arms Army, Western Military District) attacking towards Torske (13km west of Kreminna) and claimed the unit pushed Ukrainian forces back to secondary lines of defense.[24]\\n\\nRussian forces continued offensive operations south of Kreminna on February 8. The Ukrainian General Staff reported Russian troops attacked near Shepilove (7km south of Kreminna) and Bilohorivka (10km south of Kreminna).[25]\\xa0Chechen Head Ramzan Kadyrov claimed that elements of the Chechen ”Akhmat” special forces and 2nd\\xa0Brigade of the Luhansk People’s Republic 2nd\\xa0Army Corps captured Ukrainian positions near Berestove, 30km south of Kreminna.[26]\\xa0Russian forces appear to be pushing northeast of the Bakhmut area towards Siversk (17km southwest of Kreminna) to provide a supporting line of advance to the likely main Russian push directly westward toward Kreminna.\\n\\nRussian Subordinate Main Effort #2—Donetsk Oblast\\xa0(Russian objective: Capture the entirety of Donetsk Oblast, the claimed territory of Russia’s proxies in Donbas)\\n\\nRussian forces conducted ground attacks around Bakhmut and continued making tactical advances on February 8. Geolocated footage posted between February 4 and 8 confirms that Russian forces have made marginal advances north of Bakhmut near Krasna Hora and Zaliznyanske (10km north of Bakhmut), in the Stupky area of northern Bakhmut, and southwest of Bakhmut near Ivanivske.[27]\\xa0Russian forces are visually confirmed to be within 2.5 km of the E40 Bakhmut-Slovyansk highway.[28]\\xa0The Ukrainian General Staff also reported that Ukrainian troops repelled Russian attacks on Bakhmut itself; northeast of Bakhmut near Verkhnokamyanske (30km northeast), Fedorivka (15km northeast), Spirne (27km northeast), and Vymika (20km northeast); north of Bakhmut near Paraskoviivka (5km north) and Krasna Hora (4km north); northwest of Bakhmut near Orikhovo-Vasylivka (12km northwest) and Dubovo-Vasylivka (7km northwest); and west of Bakhmut near Ivanivske (5km west) and Chasiv Yar (10km west).[29]\\xa0\\xa0The Ukrainian General Staff’s report that Russian forces are attacking towards Orikhovo-Vasylivka and Dubovo-Vasylivka is consistent with geolocated combat footage and indicates that Russian forces seek to encircle Bakhmut by cutting off Ukrainian forces’ access to the E40. Similarly, the report of a Russian attack on Chasiv Yar indicates that Russian forces have likely advanced closer to the T0504 Kostyantynivka-Chasiv Yar-Bakhmut highway southwest of Bakhmut.\\xa0\\xa0Russian sources claimed that Wagner Group fighters took control of Krasna Hora and are fighting northeast of Bakhmut.[30]\\xa0Russian milbloggers also claimed that Wagner Group forces established fire control over a section of the T0504 highway between Stupochky and Ivanivske.[31]\\n\\nRussian forces conducted limited ground attacks in the Avdiivka-Donetsk City area on February 8. The Ukrainian General Staff reported that Ukrainian forces repelled Russian assaults near Avdiivka, north of Avdiivka near Kamianka, and along the western outskirts of Donetsk City near Vodyane, Pervomaiske, and Krasnohorivka.[32]\\xa0Former Russian officer and prominent milblogger Igor Girkin claimed that Russian forces did not advance near Avdiivka and took heavy losses.[33]\\xa0Another milblogger claimed that fighting is ongoing in western Marinka (on the southwestern outskirts of Donetsk City) and that unspecified elements of the Southern Military District (SMD) advanced through urban areas of Marinka on February 8.[34]\\xa0The milblogger also stated that Russian forces were able to gain a foothold in positions near a tire repair plant in Marinka.[35]\\xa0Videos posted by milbloggers on February 8 reportedly show SMD tank units attacking a Ukrainian position in Marinka and Russian tanks operating in western Marinka.[36]\\xa0Former Deputy LNR Interior Minister Vitaly Kiselev posted a video on February 8 purportedly showing Russian elements of the 150th Motorized Rifle Division (8th Combined Arms Army, SMD) attacking Marinka and claimed that Russian forces had cleared all Ukrainian fortifications there.[37]\\xa0The deployment of valuable Russian conventional military units (as opposed to DNR proxy forces) in the area is notable, if confirmed. Girkin, however, claimed that the situation in Marinka has not changed and continues at a sluggish pace.[38]\\n\\nRussian forces conducted a limited ground attack in western Donetsk Oblast on February 8. The Ukrainian General Staff reported that Ukrainian forces repelled Russian assaults near Bohoyavlenka (25km southwest of Donetsk City).[39]\\xa0Russian sources made conflicting claims about the status of operations in this area. One milblogger claimed that fierce fighting is ongoing near Vuhledar (30km southwest of Donetsk City), while other milbloggers stated that there is no active fighting in the area.[40]\\xa0Girkin claimed that Ukrainian forces repelled Russian assaults near\\xa0Vuhledar and inflicted heavy losses.[41]\\xa0Odesa Military Administration Spokesman Serhiy Bratchuk shared a video on February 8 of Ukrainian forces attacking and halting a disorganized Russian mechanized column near Vuhledar.[42]\\n\\nSupporting Effort—Southern Axis\\xa0(Russian objective: Maintain frontline positions and secure rear areas against Ukrainian strikes)\\n\\nRussian and Ukrainian forces reportedly continued small scale skirmishes and reconnaissance activity in the Dnipro River delta and on the Kinburn Spit on February 8. The United Kingdom Ministry of Defense (UK MoD) reported that Russian forces are using small boats to try to maintain a presence on islands in the Dnipro River delta south of Kherson City and that Ukrainian forces have deployed long-range artillery to strike several Russian outposts on the islands.[43]\\xa0The UK MoD reported that Russian and Ukrainian forces have likely deployed small groups on the Kinburn Spit in Mykolaiv Oblast, aiming to control the Dnipro Gulf.[44]\\xa0Ukraine’s Southern Operational Command Spokesperson Natalia Humenyuk previously stated that Russian forces are increasing the number of reconnaissance and sabotage attempts in the area of the Dnipro River delta as part of an information operation to create a perceived threat against Kherson City.[45]\\n\\nRussian forces continue to construct defensive fortifications in Zaporizhia Oblast. Satellite imagery collected between January 26 and February 7 shows Russian forces expanding trench and field fortifications near Tarasivka, Zaporizhia Oblast.[46]\\xa0Russian forces likely constructed these fortifications to further strengthen Russian positions along the T0401 highway between Polohy and Tokmak.\\xa0\\xa0Russian forces are likely establishing long defensive lines along critical grounds lines of communication (GLOCs) in Zaporizhia Oblast in preparation to defend against possible future Ukrainian counteroffensive operations along the Zaporizhia frontline. However, ISW has not observed Russian forces constructing defenses intended to halt a cross-country Ukrainian attack on a large front, and defensive positions remain limited to main roads.\\n\\nRussian forces continued routine fire west of Hulyaipole and in Dnipropetrovsk, Kherson, and Mykolaiv Oblasts on February 8.[47]\\xa0Ukrainian sources reported that Russian forces struck Kherson City and in the vicinity of Ochakiv, Mykolaiv Oblast.[48]\\n\\nMobilization and Force Generation Efforts\\xa0(Russian objective: Expand combat power without conducting general mobilization)\\n\\nRussian officials continued attempts to extend social benefits held by regular Russian servicemembers to volunteer formations serving in Ukraine. Russian Prime Minister Mikhail Mishustin stated on February 8 that the Russian government has prepared new measures to support volunteers, including increasing pensions and social assistance payments related to injuries and disabilities.[49]\\xa0The Russian State Duma is reportedly drafting a bill to include provisions against discrediting volunteer detachments assisting the Russian military in Ukraine, as Wagner Group Financier Yevgeny Prigozhin previously demanded.[50]\\xa0The Kremlin is likely pursuing efforts to more formally recognize volunteer formations in order to mitigate continued criticism of the Russian Ministry of Defense (MoD) over the unclear status of volunteer formations.[51]\\n\\nThe Wagner Group is reportedly resorting to more coercive tactics in its campaign to recruit prisoners, possibly in response to declining numbers of recruits since autumn 2022. Independent Russian outlet\\xa0Agentstvo\\xa0reported on February 8 that Russian lawyers and human rights activists stated that Wagner Group representatives and Russian Ministry of Internal Affairs and Federal Security Service (FSB) officials are threatening prisoners in Samara and Rostov oblasts, Krasnodar Krai, and the North Caucasus with new criminal cases if they refuse to volunteer with the Wagner Group in Ukraine.[52]\\xa0One of the lawyers reportedly stated that fewer convicts have agreed to volunteer with the Wagner Group in an unspecified recent period because of information about its high casualties, supporting ISW’s previous assessment that Russian convicts’ resistance may have caused a decline in the Wagner Group’s prison recruitment campaign.[53]\\xa0The Wagner Group will likely continue these more coercive practices as it seeks to replenish its forces in Ukraine with more convict recruits following months of highly attritional human wave attacks in eastern Ukraine.\\n\\nRussian officials continue to promote incremental efforts to fix longstanding personnel issues associated with mobilization. Russian Deputy Chairman of the Federation Council (and head of the mobilization working group) Andrey Turchak claimed that the mobilization working group has received appeals from 22,000 Russian servicemembers and their family members since holding its first meeting on December 29, 2022, addressing issues like the incorrect accrual of payments and the wrongful mobilization of fathers with many children who should be exempt.[54]\\xa0Turchak stated that the working group has heavily focused on solving poor recordkeeping issues through efforts to digitize military registration information from military recruitment offices.[55]\\xa0Turchak claimed that the working group sent a report to Russian President Vladimir Putin with recommendations to establish comprehensive rehabilitation centers, a minimum set of measures to support family members, a reduced term for recognizing a Russian soldier as missing, and a guarantee for receiving pensions.[56]\\xa0These proposals and efforts are likely meant primarily to placate ultranationalist figures that criticized the numerous issues associated with mobilization and hedge against further domestic discontent ahead of a likely second wave of mobilization.\\n\\nActivity in Russian-occupied Areas\\xa0(Russian objective: consolidate administrative control of and annexed areas; forcibly integrate Ukrainian civilians into Russian sociocultural, economic, military, and governance systems)\\n\\nRussian occupation authorities are continuing efforts to increase connectivity between Russia and southern Ukraine. Kherson Occupation Head Vladimir Saldo claimed on February 8 that Russian occupation authorities have approved design and research works on a new highway that will run from Crimea, north of the Sea of Azov, to Rostov-on-Don, Russia.[57]\\xa0Saldo also claimed that the construction of a new town in the Arabat Spit in northeast Crimea has begun.[58]\\xa0ISW has previously assessed that Russian occupation authorities likely seek to increase the population in the deep rear of occupied territories to strengthen production capabilities and support logistics related to Russia’s invasion of Ukraine.[59]\\n\\nRussian occupation authorities continue to lean on patronage-like partnerships with Russian federal subjects to restore infrastructure in occupied territories. Donetsk People’s Republic (DNR) Head Denis Pushilin claimed on February 8 that he held a meeting with Sakhalin Oblast Governor Valery Limarenko in which they discussed Sakhalin Oblast’s plans to help repair kindergartens, stadiums, schools, and playgrounds in occupied Shakhtarsk, Donetsk Oblast.[60]\\xa0Luhansk People’s Republic (LNR) Head Leonid Pasechnik held a meeting with Voronezh Oblast Governor Aleksandr Gusev on February 8 during which Gusev claimed that Voronezh Oblast hopes to develop occupied Luhansk Oblast to not only extract raw materials, but also to develop a processing industry.[61]\\xa0Gusev claimed that Voronezh Oblast will double the amount of aid it previously provided occupied Luhansk Oblast in 2022 to bring living standards in occupied Luhansk Oblast to those of Russia’s “national” level.[62]\\n\\nSignificant activity in Belarus\\xa0(ISW assesses that a Russian or Belarusian attack into northern Ukraine in early 2023 is extraordinarily unlikely and has thus restructured this section of the update. It will no longer include counter-indicators for such an offensive.\\n\\nISW will continue to report daily observed Russian and Belarusian military activity in Belarus, but these are not indicators that Russian and Belarusian forces are preparing for an imminent attack on Ukraine from Belarus. ISW will revise this text and its assessment if it observes any unambiguous indicators that Russia or Belarus is preparing to attack northern Ukraine.)\\n\\nBelarusian airborne forces may be conducting tactical force-on-force exercises with Russian airborne elements in Belarus. The Belarusian Ministry of Defense announced on February 8 that unspecified airborne infantry companies — likely of the Belarusian 38th Air Assault Brigade — conducted a force-on-force company tactical exercise at the Brest Training Ground, emphasizing using unmanned aerial vehicles, urban warfare, small unit tactics, and tactical medicine.[63]\\xa0It is unclear if Russian airborne forces participated in this exercise. The Belarusian 38th Air Assault Brigade has historically conducted joint exercises with elements of the Russian 76th Air Assault Division, 106th Airborne Division, and the 31st Air Assault Brigade - all units that have taken casualties in Ukraine and require regeneration.[64]\\n\\nBelarusian maneuver elements continue conducting exercises in Belarus. Unspecified elements of the Belarusian 19th Separate Guards Mechanized Brigade conducted tactical readiness exercises at the Lepelsky Training Ground in Vitebsk Oblast, Belarus, on February 8.[65]\\n\\nNote: ISW does not receive any classified material from any source, uses only publicly available information, and draws extensively on Russian, Ukrainian, and Western reporting and social media as well as commercially available satellite imagery and other geospatial data as the basis for these reports. References to all sources used are provided in the endnotes of each update.\\n\\n[1]\\xa0https://isw.pub/UkrWar020623;\\xa0https://isw.pub/UkrWar020423; https://isw.pub/UkrWar020223\\n\\n[2]\\xa0https://t.me/DeepStateUA/15451\\n\\n[3]\\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-january-25-2023\\n\\n[4]\\xa0https://t.me/rybar/43387;\\xa0https://t.me/notes_veterans/7845;\\xa0https://t.me/russkiy_opolchenec/35783;\\xa0https://t.me/RVvoenkor/37711;\\xa0https://t.me/wargonzo/10782;\\xa0https://t.me/vysokygovorit/10725;\\xa0https://t.me/vysokygovorit/10704;\\xa0https://t.me/vysokygovorit/10706;\\xa0https://t.me/vysokygovorit/10703;\\xa0https://t.me/wargonzo/10726;\\xa0https://t.me/kommunist/15515;\\xa0https://t.me/rybar/43256;\\xa0https://t.me/rybar/43257;\\xa0https://t.me/dva_majors/8678;\\xa0https://t.me/rybar/43256;\\xa0https://t.me/vysokygovorit/10684;\\xa0https://t.me/rybar/43220;\\xa0https://t.me/rybar/43218;\\xa0https://t.me/wargonzo/10658;\\xa0https://t.me/rybar/43197;\\xa0https://t.me/boris_rozhin/76787;\\xa0https://t.me/Z4LPR/445;\\xa0https://t.me/m0sc0wcalling/18752;\\xa0https://t.me/komdiv_76/311;\\xa0https://t.me/harry_homolsky/3185\\n\\n[5]https://www.understandingwar.org/sites/default/files/Russian%20Operations%20Assessments%20January%2027%202023.pdf\\n\\n[6]\\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-january-15-2023\\n\\n[7]\\xa0https://t.me/ostorozhno_novosti/14167\\n\\n[8]\\xa0https://isw.pub/UkrWar020323\\xa0;\\xa0https://isw.pub/UkrWar020423\\n\\n[9]\\xa0https://t.me/ostorozhno_novosti/14167\\n\\n[10]\\xa0https://podolyaka\\xa0dot ru/2023/02/08/zayavleniya-premer-ministra-rf-mihaila-mishustina-o-podderzhke-uchastnikov-svo-i-voennoy-promyshlennosti/;\\xa0https://stolica-s\\xa0dot su/archives/366231;\\xa0https://t.me/rybar/43402\\n\\n[11]\\xa0https://podolyaka\\xa0dot ru/2023/02/08/zayavleniya-premer-ministra-rf-mihaila-mishustina-o-podderzhke-uchastnikov-svo-i-voennoy-promyshlennosti/;\\xa0https://stolica-s\\xa0dot su/archives/366231;\\xa0https://t.me/rybar/43402\\n\\n[12]\\xa0https://isw.pub/UkrWar011823\\xa0;\\xa0https://isw.pub/UkrWar010723\\xa0;\\n\\n[13]\\xa0https://isw.pub/UkrWar020623\\xa0;\\xa0https://isw.pub/UkrWar020123\\n\\n[14]\\xa0https://www.gov.uk/government/news/new-sanctions-target-putins-war-machine-and-financial-networks-as-uk-accelerates-economic-pressure-on-russia\\n\\n[15]\\xa0https://www.cbsnews.com/news/ukraine-war-russia-iranian-drones-us-made-technology-chips/\\xa0;\\xa0https://isw.pub/UkrWar020623\\n\\n[16]\\xa0https://suspilne\\xa0dot media/amp/378863-de-okupanti-posiluut-prisutnist-na-harkivsini-dani-sinegubova/\\n\\n[17]\\xa0https://t.me/kommunist/15598; https://understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-6-2023\\n\\n[18]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCXigpCmwEnYbhGorMX4DoRP98heCwqkGax2jw7LAfJod8mgl\\n\\n[19]\\xa0https://t.me/strelkovii/3896\\n\\n[20]\\xa0https://t.me/luhanskaVTSA/8438\\n\\n[21]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCXigpCmwEnYbhGorMX4DoRP98heCwqkGax2jw7LAfJod8mgl\\n\\n[22]\\xa0https://t.me/russkiy_opolchenec/35783; https://t.me/RVvoenkor/37711\\n\\n[23]\\xa0https://t.me/rybar/43387;\\xa0https://t.me/notes_veterans/7845\\n\\n[24]\\xa0https://t.me/wargonzo/10782\\n\\n[25]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCXigpCmwEnYbhGorMX4DoRP98heCwqkGax2jw7LAfJod8mgl\\n\\n[26]\\xa0https://t.me/RKadyrov_95/3332\\n\\n[27]\\xa0https://twitter.com/fdov21/status/1623368452667805701\\n\\n[28]\\xa0https://twitter.com/Militarylandnet/status/1623071883988987905; https://twitter.com/EerikMatero/status/1623076900548517892; https://twitter.com/neonhandrail/status/1623206937134497792; https://twitter.com/neonhandrail/status/1623207358888558593\\n\\n[29]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCXigpCmwEnYbhGorMX4DoRP98heCwqkGax2jw7LAfJod8mgl\\n\\n[30]\\xa0https://t.me/wargonzo/10773;\\xa0https://t.me/strelkovii/3896\\n\\n[31]\\xa0https://t.me/DonbassYasinovatayanaliniiOgnia/36445;\\xa0https://t.me/NeoficialniyBeZsonoV/22062;\\xa0https://t.me/wargonzo/10773;\\xa0https://t.me/strelkovii/3896\\n\\n[32]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCXigpCmwEnYbhGorMX4DoRP98heCwqkGax2jw7LAfJod8mgl\\n\\n[33]\\xa0https://t.me/strelkovii/3896\\n\\n[34]\\xa0https://t.me/rybar/43405\\n\\n[35]\\xa0https://t.me/rybar/43405\\n\\n[36]\\xa0https://t.me/boris_rozhin/77568;\\xa0https://t.me/sashakots/38439\\n\\n[37]\\xa0https://t.me/kommunist/15635\\n\\n[38]\\xa0https://t.me/strelkovii/3896\\n\\n[39]https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCXigpCmwEnYbhGorMX4DoRP98heCwqkGax2jw7LAfJod8mgl\\n\\n[40]\\xa0https://t.me/boris_rozhin/77574;\\xa0https://t.me/wargonzo/10773\\n\\n[41]\\xa0https://t.me/strelkovii/3896\\n\\n[42]\\xa0https://t.me/Bratchuk_Sergey/29230\\n\\n[43]\\xa0https://twitter.com/DefenceHQ/status/1623199796352745475/photo/1\\n\\n[44]\\xa0https://twitter.com/DefenceHQ/status/1623199796352745475/photo/1\\n\\n[45]\\xa0https://armyinform dot\\xa0com.ua/2023/02/01/zbilshennya-kilkosti-rozviduvalnyh-grup-voroga-v-gyrli-dnipra-mozhe-buty-oznakoyu-nagnitannya-sytuacziyi-gumenyuk/\\n\\n[46]\\xa0https://twitter.com/bradyafr/status/1623082928283746304?s=20&t=ETx-WeYabYcAhBWPxEz2BA\\n\\n[47]\\xa0https://t.me/mykolaivskaODA/4236\\xa0;\\xa0\\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCXigpCmwEnYbhGorMX4DoRP98heCwqkGax2jw7LAfJod8mgl\\xa0;\\xa0\\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02kL8XZwXNsSUphpcF5SAsVUR92f3mJJevFsSWvEZnRJsXKEr7LQzhWmWxXFubauUml\\xa0;\\xa0https://t.me/khersonskaODA/3607\\xa0; https://t.me/khersonskaODA/3616; https://t.me/khersonskaODA/3613;\\xa0https://t.me/khersonskaODA/3615\\xa0;\\xa0https://www.facebook.com/sergey.khlan/posts/pfbid02L4QqnKMLM3QLzY1pvQrr5CxtPVxrEu55qdBouZ7dB3jqdrfGhBHuXQyW5tavq4d3l\\xa0;\\xa0https://t.me/mykolaivskaODA/4236\\xa0\\xa0;\\xa0https://t.me/zoda_gov_ua/16505\\xa0\\xa0;\\xa0https://t.me/vilkul/2680\\xa0\\xa0;\\xa0https://t.me/Yevtushenko_E/2419\\n\\n[48]\\xa0https://t.me/mykolaivskaODA/4236\\xa0;\\xa0\\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid0FuH223o7wLNSiJSNdCXigpCmwEnYbhGorMX4DoRP98heCwqkGax2jw7LAfJod8mgl\\xa0;\\xa0\\xa0https://www.facebook.com/GeneralStaff.ua/posts/pfbid02kL8XZwXNsSUphpcF5SAsVUR92f3mJJevFsSWvEZnRJsXKEr7LQzhWmWxXFubauUml\\xa0;\\xa0https://t.me/khersonskaODA/3607\\n\\n[49]\\xa0https://podolyaka dot ru/2023/02/08/zayavleniya-premer-ministra-rf-mihaila-mishustina-o-podderzhke-uchastnikov-svo-i-voennoy-promyshlennosti/; https://stolica-s dot su/archives/366231; https://t.me/rybar/43402\\n\\n[50]\\xa0https://isw.pub/UkrWar020723; https://t.me/concordgroup_official/425; https://t.me/Prigozhin_hat/2612\\n\\n[51]\\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-1-2023\\n\\n[52]\\xa0https://t.me/agentstvonews/2482\\n\\n[53]\\xa0https://t.me/agentstvonews/2482\\xa0;\\xa0https://isw.pub/UkrWar020123\\n\\n[54]\\xa0https://t.me/turchak_andrey/1032\\xa0;\\xa0\\xa0https://isw.pub/UkrWar122922\\n\\n[55]\\xa0https://t.me/turchak_andrey/1032\\n\\n[56]\\xa0https://t.me/turchak_andrey/1032\\n\\n[57]\\xa0https://t.me/SALDO_VGA/363;\\xa0https://t.me/SALDO_VGA/365\\n\\n[58]\\xa0https://t.me/SALDO_VGA/363;\\xa0https://t.me/SALDO_VGA/365\\n\\n[59]\\xa0https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-january-5-2023\\n\\n[60]\\xa0https://t.me/pushilindenis/3165\\n\\n[61]\\xa0https://t.me/glava_lnr_info/745;\\xa0https://t.me/glava_lnr_info/748\\n\\n[62]\\xa0https://t.me/glava_lnr_info/745;\\xa0https://t.me/glava_lnr_info/748\\n\\n[63]\\xa0https://t.me/modmilby/22455; https://t.me/modmilby/22419\\n\\n[64]\\xa0https://www.osw.waw.pl/sites/default/files/OSW-Report_Russia%E2%80%99s-Belarusian-army_net.pdf\\n\\n[65]\\xa0https://t.me/modmilby/22470\\n\\nTags\\n\\nUkraine Project\\n\\nFile Attachments:\\n\\nZaporizhia Battle Map Draft February 08,2023.png\\n\\nKherson-Mykolaiv Battle Map Draft February 08,2023.png\\n\\nDonetsk Battle Map Draft February 08,2023.png\\n\\nDraftUkraineCoTFebruary08,2023.png\\n\\nKharkiv Battle Map Draft February 08,2023.png\\n\\n1400 16th Street NW, Suite 515 Washington, DC 20036\\n\\nph (202) 293-5550\\n\\n©2007 – 2024 THE INSTITUTE FOR THE STUDY OF WAR', metadata={'source': 'https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-8-2023'})"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "loader = UnstructuredURLLoader(urls=urls)\n",
    "\n",
    "data = loader.load()\n",
    "\n",
    "data[0]"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "f3afa135",
   "metadata": {},
   "source": [
    "## Selenium URL Loader\n",
    "\n",
    "This covers how to load HTML documents from a list of URLs using the `SeleniumURLLoader`.\n",
    "\n",
    "Using `Selenium` allows us to load pages that require JavaScript to render.\n",
    "\n",
    "\n",
    "To use the `SeleniumURLLoader`, you have to install `selenium` and `unstructured`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4d2b86cf-55c6-430d-bf31-45591a1aa25a",
   "metadata": {},
   "outputs": [],
   "source": [
    "%pip install --upgrade --quiet selenium unstructured"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "5fc50835",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Document(page_content='Menu\\n\\nSearch\\n\\nClose\\n\\nCollapse side panel\\n\\n323,527 photos\\n\\nCN Tower\\n\\n4.6\\n\\n(71,071)\\n\\nTourist attraction\\n\\nOverview\\n\\nTickets\\n\\nReviews\\n\\nAbout\\n\\nDirections\\n\\nSave\\n\\nNearby\\n\\nSend to phone\\n\\nShare\\n\\nLandmark, over 553-metre tower featuring a glass floor & a revolving eatery with panoramic views.\\n\\nSponsoredBy CityPASS\\n\\nSave 42% at 5 top Toronto attractions.$92\\xa0·\\xa04.6(9k+)Entry included\\n\\nAdmission\\n\\nAbout these results\\n\\nGives you entry to this place\\n\\nCN Tower Official site$32.87\\ue315Instant confirmation · Mobile ticket\\n\\nEvendo $60.43\\ue315Multi-attraction pass · Free cancellation\\n\\nCityPASS $92.04\\ue315Multi-attraction pass · Mobile ticket\\n\\nMore\\n\\n290 Bremner Blvd, Toronto, ON M5V 3L9, Canada\\n\\nOpen ⋅ Closes 9:30\\u202fPM\\n\\nCanada Day hours\\n\\nMonday (Canada Day) 9:30\\u202fAM–9:30\\u202fPM Holiday hours Tuesday 9:30\\u202fAM–9:30\\u202fPM Wednesday 9:30\\u202fAM–9:30\\u202fPM Thursday 9:30\\u202fAM–9:30\\u202fPM Friday 9:30\\u202fAM–9:30\\u202fPM Saturday 9:30\\u202fAM–9:30\\u202fPM Sunday 9:30\\u202fAM–9:30\\u202fPM\\n\\nSuggest new hours\\n\\n\\ue80bcntower.ca\\n\\n+1 416-868-6937\\n\\nJJV7+25 Toronto, Ontario, Canada\\n\\nSend to your phone\\n\\nLGBTQ+ friendly\\n\\n\\ue3c9Suggest an edit\\n\\nTours & Activities\\n\\nAbout these results\\n\\nGives you more ways to discover this place\\n\\nGetYourGuide $98Guided Night Tour with CN Tower Entry4.7(227) • 2h 30m\\n\\nEvendo $95Toronto Small Group Night Tour with CN Tower4.7(40) • 2h 30m\\n\\nViator $101Toronto Small Group Night Tour with CN Tower4.7(41) • 2h 30m\\n\\nMore\\n\\nUpdates from customers\\n\\nNice place to have city view. Plan in advance to avoid crowd during weekends\\n\\na day ago\\n\\nPopular times\\n\\nMondays\\n\\nBased on visits to this place.\\n\\n6a\\n\\n9a\\n\\n12p\\n\\n3p\\n\\n6p\\n\\n9p\\n\\nLive\\n\\nBusier than usual\\n\\n6a\\n\\n9a\\n\\n12p\\n\\n3p\\n\\n6p\\n\\n9p\\n\\n6a\\n\\n9a\\n\\n12p\\n\\n3p\\n\\n6p\\n\\n9p\\n\\n6a\\n\\n9a\\n\\n12p\\n\\n3p\\n\\n6p\\n\\n9p\\n\\n6a\\n\\n9a\\n\\n12p\\n\\n3p\\n\\n6p\\n\\n9p\\n\\n6a\\n\\n9a\\n\\n12p\\n\\n3p\\n\\n6p\\n\\n9p\\n\\n6a\\n\\n9a\\n\\n12p\\n\\n3p\\n\\n6p\\n\\n9p\\n\\nPhotos & videos\\n\\nAll\\n\\nLatest\\n\\nToday\\n\\nVideos\\n\\nEdgeWalk at the\\n\\nSHARPSHOOTR – SIXSHOOTR\\n\\nBy owner\\n\\nStreet View & 360°\\n\\nAdd photos & videos\\n\\nAt this place\\n\\n360 The Restaurant at the CN Tower\\n\\n4.1(6,819)\\n\\n$$$$\\n\\nCanadian restaurant\\n\\nFloor 1\\n\\nOpen ⋅ Closes 10\\u202fPM\\n\\nEdgeWalk at the CN Tower\\n\\n4.8(652)\\n\\nTourist attraction\\n\\nFloor 1\\n\\nOpen ⋅ Closes 9\\u202fPM\\n\\nSkypod CN Tower\\n\\n4.7(387)\\n\\nObservation deck\\n\\nFloor 1\\n\\nOpen ⋅ Closes 10:30\\u202fPM\\n\\nCN TOWER Restaurant\\n\\n4.3(98)\\n\\nBuffet restaurant\\n\\nView all\\n\\nQuestions and answers\\n\\nWhat’s CN means\\n\\nCN stands for Canadian National, it was built by the Canadian National Railway (correct me if I\\'m wrong)\\n\\nSee 23 answers\\n\\n6 years ago\\n\\nMore questions\\n\\nReview summary\\n\\nReviews are automatically processed to detect inappropriate content like fake reviews and spam. We may take down reviews that are flagged in order to comply with \\n\\nGoogle policies or legal obligations.\\n\\n5 4 3 2 1\\n\\n4.6\\n\\n71,071 reviews\\n\\n\"Fantastic View ,\\n\\nFood\\n\\nService\\n\\n, Great Family outing\\n\\nlocation\\n\\n\"Could be cheaper a\\n\\nbit\\n\\nlol\\n\\notherwise great\\n\\nplace\\n\\nto be at anytime of the\\n\\nyear\\n\\n\"Not one of us had a\\n\\nthing\\n\\nleft on our\\n\\nplate\\n\\nand every\\n\\npiece\\n\\nof\\n\\nbread\\n\\nwas eaten.\"\\n\\nWrite a review\\n\\nReviews\\n\\nSort\\n\\nAll\\n\\nelevator\\n\\n1436\\n\\nglass floor\\n\\n1192\\n\\nobservation deck\\n\\n706\\n\\nrevolving restaurant\\n\\n309\\n\\nqueue\\n\\n308\\n\\naquarium\\n\\n203\\n\\nskyscrapers\\n\\n100\\n\\nblue jays\\n\\n68\\n\\nskywalk\\n\\n53\\n\\nmetal detector\\n\\n25\\n\\n+6\\n\\nRohan Kulkarni\\n\\nLocal Guide · 97 reviews · 206 photos\\n\\n\\ue838\\ue838\\ue838\\ue838\\ue838\\n\\na week ago\\n\\nNew\\n\\nDuring summer weekends the wait times are usually longer around 30-45 minutes. Especially during evening time as people tend to visit to catch the sunset view of the city. This is a must visit if you’re a tourist or never visited any other …\\n\\nMore\\n\\n0:30\\n\\n+12\\n\\nLike2\\n\\nShare\\n\\nP Can**l**!a (PbTC)\\n\\nLocal Guide · 43 reviews · 116 photos\\n\\n\\ue838\\ue838\\ue838\\ue838\\ue838\\n\\na week ago\\n\\nNew\\n\\nCome and visit CN Tower they have 360° view of the city, high rises and airport. I recommend buying ticket in advance and come before 11:00 am. I don’t really like the elevator as I have motion sickness, it runs 22km/hr to get up there. …\\n\\nMore\\n\\n0:13\\n\\n0:09\\n\\n0:16\\n\\n0:15\\n\\n+3\\n\\nLike2\\n\\nShare\\n\\nManan Pandya\\n\\nLocal Guide · 72 reviews · 139 photos\\n\\n\\ue838\\ue838\\ue838\\ue838\\ue838\\n\\n4 weeks ago\\n\\nOne of Toronto\\'s tourism attractions. The tower provides a lovely perspective of Lake Ontario and the city, which is home to a number of remarkable high-rise buildings. The lower deck\\'s glass floor is wonderful, but it\\'s only for people who …\\n\\nMore\\n\\n0:08\\n\\nLike3\\n\\nShare\\n\\nMore reviews (71,068)\\n\\nPeople also search for\\n\\nToronto Sign\\n\\n4.7(14,202)\\n\\nTourist attraction\\n\\nCN Tower Photo Spot\\n\\n4.6(21)\\n\\nTourist attraction\\n\\nClock Tower\\n\\n4.8(16)\\n\\nHistorical landmark\\n\\nRoundhouse Park\\n\\n4.5(5,289)\\n\\nPark\\n\\nCasa Loma\\n\\n4.5(28,386)\\n\\nMuseum\\n\\nWeb results\\n\\nAbout this data\\n\\nCollapse side panel\\n\\nCollapse side panel\\n\\n When you have eliminated the \\n\\nEnable JavaScript to see Google Maps.', metadata={'source': 'https://goo.gl/maps/NDSHwePEyaHMFGwh8', 'title': 'CN Tower - Google Maps', 'description': 'No description found.', 'language': 'en'})"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from langchain_community.document_loaders import SeleniumURLLoader\n",
    "\n",
    "urls = [\n",
    "    \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",\n",
    "    \"https://goo.gl/maps/NDSHwePEyaHMFGwh8\",\n",
    "]\n",
    "\n",
    "loader = SeleniumURLLoader(urls=urls)\n",
    "\n",
    "data = loader.load()\n",
    "\n",
    "data[1]"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "a2c1c79f",
   "metadata": {},
   "source": [
    "## Playwright URL Loader\n",
    "\n",
    "This covers how to load HTML documents from a list of URLs using the `PlaywrightURLLoader`.\n",
    "\n",
    "[Playwright](https://playwright.dev/) enables reliable end-to-end testing for modern web apps.\n",
    "\n",
    "As in the Selenium case, `Playwright` allows us to load and render the JavaScript pages.\n",
    "\n",
    "To use the `PlaywrightURLLoader`, you have to install `playwright` and `unstructured`. Additionally, you have to install the `Playwright Chromium` browser:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "017ba3d2-ccb0-4c24-a079-44a8e524b2fa",
   "metadata": {},
   "outputs": [],
   "source": [
    "%pip install --upgrade --quiet playwright unstructured"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "53158417",
   "metadata": {},
   "outputs": [],
   "source": [
    "!playwright install"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2ec62600",
   "metadata": {},
   "source": [
    "Currently, nly the async method supported:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "0ab4e115",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Document(page_content=\"Rick Astley - Never Gonna Give You Up (Official Music Video)\\n\\nSearch\\n\\nWatch later\\n\\nShare\\n\\nCopy link\\n\\nInfo\\n\\nShopping\\n\\nTap to unmute\\n\\n2x\\n\\nIf playback doesn't begin shortly, try restarting your device.\\n\\nUp next\\n\\nLiveUpcoming\\n\\nPlay Now\\n\\nRick Astley\\n\\nSubscribe\\n\\nSubscribed\\n\\nThe new album, 'Are We There Yet?' out now!\\n\\nRick Astley - Forever and More (Official Video)3:47\\n\\nThis video is unavailable\\n\\nAre We There Yet?15 videos\\n\\nRick Astley\\n\\nSubscribe\\n\\nSubscribed\\n\\nYou're signed out\\n\\nVideos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.\\n\\nShare\\n\\nAn error occurred while retrieving sharing information. Please try again later.\\n\\n0:00\\n\\n0:00 / 3:32\\n\\nWatch full video\\n\\n•\\n\\nScroll for details\\n\\n•\\n              \\n            \\n          \\n        \\n        \\n          \\n            \\n          \\n        \\n      \\n      \\n    \\n    NaN / NaN\\n\\nNaN / NaN\\n\\nNaN / NaN\\n\\nNaN / NaN\\n\\nNaN / NaN\\n\\nSearch\", metadata={'source': 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'})"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from langchain_community.document_loaders import PlaywrightURLLoader\n",
    "\n",
    "urls = [\n",
    "    \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",\n",
    "    \"https://goo.gl/maps/NDSHwePEyaHMFGwh8\",\n",
    "]\n",
    "\n",
    "loader = PlaywrightURLLoader(urls=urls, remove_selectors=[\"header\", \"footer\"])\n",
    "\n",
    "data = await loader.aload()\n",
    "\n",
    "data[0]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
